package spec.asumuliu.unit5;

import spec.asumuliu.unint3.Student;

import java.util.LinkedList;

/*
*链表测试
 */
public class LinkedListTest {
    public static void main(String[] args){
        LinkedList ll = new LinkedList();
        Student s1=new Student("张三","123456");
        Student s2=new Student("李四","123457");
        Student s3=new Student("王五","123458");
        ll.addFirst(s1);
        ll.addFirst(s2);
        ll.addFirst(s3);
        ll.add(s2);
        System.out.println(ll.size());           // 4
        System.out.println(ll.getFirst());      //李四
        System.out.println(ll.getLast());       //李四
    }
}
